package com.foxmail.aroundme.youtubedemo.recyclerview;

/**
 * Created by gzl on 2016/10/19.
 */

import android.support.v7.widget.RecyclerView;

import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;

import com.foxmail.aroundme.youtubedemo.R;


public class RecyclerViewHolder extends RecyclerView.ViewHolder {
    Button button;
    //铺盖在上层的FrameLayout
    FrameLayout changeFrame;
    //将用来替代Fragment的FrameLayout
    FrameLayout videoFrame;
    RecyclerViewHolder lastViewHolder;
    private int id;

    public RecyclerViewHolder(View itemView) {
        super(itemView);
        button = (Button) itemView.findViewById(R.id.btn);
        changeFrame = (FrameLayout) itemView.findViewById(R.id.frame);
        //动态设置id为hashcode
        id = hashCode();
        videoFrame = (FrameLayout) itemView.findViewById(R.id.video);
        videoFrame.setId(id);
    }

    public int getId() {
        return id;
    }
}
